home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 22
/
022.d81
/
t.token translat
< prev
next >
Wrap
Text File
|
2022-08-26
|
3KB
|
161 lines
C-128 TOKEN TRANSLATOR
by
Robert W. Baker
COMMODORE MICROCOMPUTERS MAGAZINE
March/April 1986
p.60
**************************************
NOTE: This program is written for the
Commodore 128. Because of this, you
cannot run it directly from LOADSTAR.
To run this program, simply turn your
128 off, then back on. This should
put you in 128 mode. After this, all
you need to do is type
LOAD"TOKEN TRANSLATOR.128",8. When
the READY prompt appears, simply type
RUN and press RETURN.
***********************************
Those of you who have recently
upgraded your Commodore system by
buying a C-128 might have problems
running programs originally created
with the 4.0 BASIC common to older
systems since the C-128 uses 7.0
BASIC.
Fortunately, all of your old
programs are not obsolete, thanks to
TOKEN TRANSLATOR.
The problem in running 4.0 BASIC
programs on the C-128 arises from a
difference in the tokens for each
disk command. (When a program line
is stored, each BASIC keyword is
converted to a special one or two
byte value called a token).
While 4.0 BASIC and the 7.0 BASIC
used by the C-128 share common
keywords, the tokens used to denote
these keywords are different.
TOKEN TRANSLATOR translates your
original 4.0 BASIC programs so that
they can be read by the C-128 by
changing 4.0 BASIC disk command
values to the the appropriate BASIC
7.0 values.
To use TOKEN TRANSLATOR, load TOKEN
TRANSLATOR into memory, then insert
the disk containing the 4.0 BASIC
program you want translated.
When you are prompted for INPUT
FILENAME, enter the name of the
program exactly as it appears in the
disk directory.
You will then be prompted for the
OUTPUT FILENAME; enter the name of
the new program file. Make sure that
this name is different from the
original program, and does not
already appear on the disk. We
suggest tacking the suffix ".128" onto
the filename. For example, if the
filename were originally "Disker",
then the output file would be
"Disker.128."
TOKEN TRANSLATOR then proceeds to
convert the tokens of the 4.0 BASIC
program, displaying the program line
it is working on as it goes.
When the translation is complete,
the program has a good chance of
running, but additional changes may
be required. Baker warns that you
must watch out for "reserved keywords,
new special variables, and added
parameters to older commands" when
translating.
You also must be careful, he says,
"when editing existing program lines,
since lines entered on another
systems may be tokenized differently
when edited on the C-128."
Despite these cautions, however,
TOKEN TRANSLATOR should at least be a
great help in converting your old
programs to run on the C-128.
FILES REQUIRED:
TOKEN TRANSLATOR.128
----------<end of article>-----------